This feature is supported only in FX Series reader. The following functionalities are supported for facilitating embedded user application on the FX Series.
The methods that are exposed in RFID3 to support of deployment of user application are: rm.UserApp.install, rm.UserApp.uninstall, rm.UserApp.start, rm.UserApp.stop, rm.UserApp.getRunStatus, rm.UserApp.list and rm.UserApp.autoStart
String appName;
String pkgLocation;
boolean autoStart = true;
String option;
try
{
System.out.println("Enter
the name of the application:");
BufferedReader inputreader = new BufferedReader(new
InputStreamReader(System.in));
appName = inputreader.readLine();
System.out.println("Enter
the path to the package:");
pkgLocation
= inputreader.readLine();
while (true)
{
System.out.println("User Application
Deployment");
System.out.println("1. Install");
System.out.println("2. Uninstall");
System.out.println("3. Start");
System.out.println("4. Stop");
System.out.println("5. AutoStart");
System.out.println("6. List");
System.out.println("7. Status");
System.out.println("8. Exit");
option = inputreader.readLine();
if (option.equals("1"))
{
rm.UserApp.install(pkgLocation);
System.out.println("Successfully
installed application package");
}
else if (option.equals("2"))
{
rm.UserApp.uninstall(appName);
System.out.println("Successfully
uninstalled app");
}
else if (option.equals("3"))
{
rm.UserApp.start(appName);
System.out.println("Successfully started
app");
}
else if (option.equals("4"))
{
rm.UserApp.stop(appName);
System.out.println("Successfully stopped
app");
}
else if (option.equals("5"))
{
String szoption;
szoption = inputreader.readLine();
if (szoption.equals("1"))
autoStart = true;
else
autoStart = false;
rm.UserApp.autoStart(appName, autoStart);
if (autoStart == true)
System.out.println("Successfully
enabled autostart");
else
System.out.println("Successfully
disabled autostart");
}
else if (option.equals("6"))
{
UserAppInfo[] appList = rm.UserApp.list();
if (appList != null && appList.length
> 0)
{
for (int
index
= 0; index < appList.length; index++)
{
System.out.println((appList[index].getAppName()
+ ":" + appList[index].getMetaData()));
}
}
else
System.out.println("No Apps
installed");
}
else if (option.equals ("7"))
{
boolean runStatus = false;
runStatus = rm.UserApp.getRunStatus(appName);
if (runStatus ==
true)
System.out.println("App
is running");
else
System.out.println("App is
not running");
}
else if (option.equals("8"))
{
break;
}
}
}
catch (Exception ex)
{
System.out.println("User
App Deployment Failed " + ex.toString());
}